package gretha.Jtables;

import gretha.utils.HeaderListener;

import javax.swing.JTable;
import javax.swing.table.TableModel;
import javax.swing.table.TableRowSorter;

public class JTableCohorte extends JTable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -3770591411158529511L;

	public JTableCohorte(TableModel dm) {
		super(dm);
		setAutoCreateRowSorter(true);
		TableRowSorter<TableModel> sorter = new TableRowSorter<TableModel>(this.getModel());   
		setRowSorter(sorter);

		getTableHeader().addMouseListener(new HeaderListener(this.getTableHeader()));
		
	}

}
